/**
 * $Id: SoftwareEngineer.java 80 2012-12-13 16:33:00Z Denis.Skalsky@gmail.com $ 
 */
package com.globallogic.skalskyy.javabasic.valstaff;

/**
* SoftwareEngineer stores info of software developer.
* @author $Author: Denis.Skalsky@gmail.com $
* @version $Revision: 80 $
 */
public class SoftwareEngineer extends Employee {
	
	/** Language of programming */
	private String language;

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (super.equals(obj)) {
			SoftwareEngineer dev = (SoftwareEngineer)obj;
			return (this.compareLanguage(dev.getLanguage()));
		} else {
			return false;
		}
	}
	
	/**
	 * Check language for a match ignoring case
	 * @param language language for checking 
	 * @return true if matches else false
	 */
	public boolean compareLanguage(String language) {
		return this.getLanguage().equalsIgnoreCase(language);
	}
}
